{**
 * Layout for panel of Session Debug panel
 *
 * @author Pavel Železný <info@pavelzelezny.cz>
 *
 * @param string $basePath Path to directory where compnent is situated
 * @param \Nette\Http\Session $session
 * @param array $sessionMetaStore contain NetteFramework metadata about sessions
 * @param array $sessionMaxTime maximal session lifetime in seconds
 *}

{block #content}
	{stylesheet $basePath.'/templates/style.css'}
	<h1 id="nette-debug-session-panel-title">
		<img n:src="{$basePath}/templates/logo.png" width="16" height="16" />
		Session Panel
		<span class="pull-right expiration">
			<strong>Max liftime:</strong> {$sessionMaxTime} s
		</span>
	</h1>
	<div id="nette-debug-session-panel">
		<table n:foreach="$session->getIterator() as $section" n:if="in_array($section,$hiddenSections) === FALSE">
			<thead>
				<td colspan="2">
					{$section}
					<span class="pull-right expiration">
						<strong>Expiration: </strong>
						{ifset $sessionMetaStore[$section]['']['T']}
							<span title="Expiration after actual shown seconds number.">{$sessionMetaStore[$section]['']['T'] - time()} s</span>
						{elseif (isset($sessionMetaStore[$section]['']['B'])) && ($sessionMetaStore[$section]['']['B'] === TRUE)}
							<span title="Expiration after browser close.">Browser</span>
						{else}
							<span title="Expiration is not set.">No</span>
						{/ifset}
					</span>
				</td>
			</thead>
			<tbody n:inner-foreach="$session->getSection($section)->getIterator() as $key => $value">
				<tr>
					<td class="key">
						{$key}
						<div class="expiration">
							<strong>Expiration: </strong>
							{ifset $sessionMetaStore[$section][$key]['T']}
								<span title="Expiration after actual shown seconds number.">{$sessionMetaStore[$section][$key]['T'] - time()} s</span>
							{elseif (isset($sessionMetaStore[$section][$key]['B'])) && ($sessionMetaStore[$section][$key]['B'] === TRUE)}
								<span title="Expiration after browser close.">Browser</span>
							{else}
								<span title="Expiration is not set.">No</span>
							{/ifset}
						</div>
					</td>
					<td>
						{clickableDump $value}
					</td>
				</tr>
			</tbody>
		</table>

	</div>
{/block}
